{{define "root"}}
<html>

<head>
    <title>{{with .Content}}{{.Doc.Title}}{{if gt (len .Breadcrumbs ) 0}} - Sourcegraph docs{{end}}{{else}}Error{{end}}</title>
    <link rel="icon" type="image/png" href="https://about.sourcegraph.com/sourcegraph-mark.png" />
    <link rel="stylesheet" href="{{asset "bootstrap.min.css"}}?4.3.1" />
    <link rel="stylesheet" href="{{asset "layout.css"}}?12" />
    <link rel="stylesheet" href="{{asset "content.css"}}?12" />
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, viewport-fit=cover" /> {{if (or (not .Content) .ContentVersion)}}
    <meta name="robots" content="noindex">{{end}}
</head>
<body{{with .Content}}{{if eq (len .Breadcrumbs ) 0}} id="home" {{end}}{{if gt (len .Breadcrumbs ) 1}} data-path="{{.Path}}" {{end}}{{end}} class="theme theme-light">
    <div class="global-navbar">
        <input type="checkbox" id="nav-state" class="nav-state" />
        <div class="nav-content">
            <div class="nav-container flex-container">
                <div class="nav-header">
                    <a href="/" class="nav-logo">
                        <img class="nav-logo-image small-hidden" src="/assets/sourcegraph-logo-docs.svg" alt="Sourcegraph Documentation">
                        <img class="nav-logo-image-small large-hidden medium-hidden" src="/assets/sourcegraph-logo-docs-small.svg" alt="Sourcegraph Documentation">
                    </a>
                    <div id="version-selector" class="dropdown version-dropdown ml-2">
                        <button class="btn btn-outline dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                {{.ContentVersion}}{{/* If no version is specified we are on the master branch */}}{{if eq .ContentVersion ""}}master{{end}}
                            </button>
                        <details-menu aria-label="Sourcegraph version" class="dropdown-menu m-0 p-0" aria-labelledby="Version Dropdown">

                            {{/* Update these after each release. */}} {{$previousReleaseRevspec := "v3.6.2"}} {{$previousReleaseVersion := "3.6"}} {{$currentReleaseRevspec := "v3.7.1"}} {{$currentReleaseVersion := "3.7"}} {{$nextReleaseVersion := "master"}}
                            <a rel="nofollow" class="dropdown-item {{if eq .ContentVersion " "}}active{{end}}" href="/{{.ContentPagePath}}">master</a>
                            <a rel="nofollow" class=" dropdown-item {{if eq $currentReleaseVersion .ContentVersion " "}}active{{end}}" href="/@{{$currentReleaseVersion}}/{{.ContentPagePath}}">{{$currentReleaseVersion}}<span class="current-branch ml-1">current</span></a>
                            <a rel="nofollow" class=" dropdown-item {{if eq $previousReleaseVersion .ContentVersion " "}}active{{end}}" href="/@{{$previousReleaseVersion}}/{{.ContentPagePath}}">{{$previousReleaseVersion}}</a>
                        </details-menu>
                    </div>
                </div>
                <span class="mobile-nav-button"></span>
                <div class="nav-links">
                    <ul class="nav-link-container">
                        <li class="nav-link"><a href="https://about.sourcegraph.com">About</a></li>
                        <li class="nav-link"><a href="https://github.com/sourcegraph/sourcegraph">Code</a></li>
                        <li class="nav-link"><a href="https://sourcegraph.com">Sourcegraph.com</a></li>
                    </ul>
                    <form class="search-form form-inline small-hidden">
                        <input name="search" class="nav-search form-control" type="search" id="search" placeholder="Search docs..." spellcheck="false">
                        <button class="btn btn-primary nav-search-button ml-2" id="search-button" type="submit">Search</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="docs-content">
        <div class="nav-sticky-wrapper content-nav-wrapper column large-2 medium-3 mobile-show">
            <nav id="breadcrumbs-mobile" class="breadcrumbs large-hidden medium-hidden">
                <input type="button" class="content-nav-mobile-state large-hidden medium-hidden" />
                <span class="content-nav-mobile-button"></span>
                <span class="breadcrumb-links">
                    {{with .Content}}
                        {{if eq (len .Breadcrumbs ) 0}}<a href="#">Home</a>{{end}}
                            {{range .Breadcrumbs}}
                                <a href="{{.URL}}" {{if .IsActive}} class="active" {{end}}>{{.Label}}</a>
                                {{if not .IsActive}}/{{end}}
                                {{end}}
                                &nbsp;
                            {{else}}
                        {{if .ContentVersionNotFoundError}}
                            Version not found
                        {{else if .ContentPageNotFoundError}}
                            Page not found
                        {{else}}
                            Error
                        {{end}}
                    {{end}}
                </span>
            </nav>
            <div id="content-nav" class="content-nav">
                <form class="search-form form-inline mobile-search large-hidden medium-hidden">
                    <input name="search" class="nav-search form-control" type="search" placeholder="Search docs..." spellcheck="false">
                    <button class="btn btn-primary nav-search-button ml-2" type="submit">Search</button>
                </form>
                <ul class="content-nav-section expandable">
                    <li><a class="content-nav-section-header" href="/">Home</a></li>
                </ul>
                <ul class="content-nav-section expandable" data-nav-section="user">
                    <button class="content-nav-button"></button>
                    <div class="close--icon">
                        <svg class="mdi-icon material-icons" width="24" height="24" fill="#000" viewBox="0 0 24 24">
                                <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                            </svg>
                    </div>
                    <li class="content-nav-no-hover">
                        <a class="content-nav-section-header" href="/user">User documentation</a>
                        <ul class="content-nav-section-group">
                            <li><a href="/user/code_intelligence">Code intelligence overview</a></li>
                            <li><a href="/user/search">Code search overview</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/user/search/saved_searches">Saved searches</a></li>
                                    <li><a href="/user/search/queries">Search query syntax</a></li>
                                    <li><a href="/user/search/scopes">Search scopes</a></li>
                                </ul>
                            </li>
                            <li><a href="/user/themes">Color themes</a></li>
                            <li><a href="/user/organizations">Organizations</a></li>
                            <li><a href="/user/repository">Repositories</a></li>
                            <li><a href="/user/tour">Sourcegraph tour</a></li>
                            <li><a href="/user/markdown">Sourcegraph-flavored Markdown</a></li>
                            <li><a href="/user/usage_statistics">Usage statistics</a></li>
                            <li><a href="/user/user_surveys">User surveys</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="content-nav-section expandable" data-nav-section="admin">
                    <button class="content-nav-button"></button>
                    <div class="close--icon">
                        <svg class="mdi-icon material-icons" width="24" height="24" fill="#000" viewBox="0 0 24 24">
                                <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                            </svg>
                    </div>
                    <li class="content-nav-no-hover">
                        <a class="content-nav-section-header" href="/admin">Site admin documentation</a>
                        <ul class="content-nav-section-group">
                            <li><a href="/admin/ssl_https_self_signed_cert_nginx">Adding SSL (HTTPS) to Sourcegraph with a self-signed certificate</a></li>
                            <li><a href="/admin/extensions">Administration of Sourcegraph extensions and the extension registry</a></li>
                            <li><a href="/admin/external_service">External services</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/admin/external_service/github">GitHub</a></li>
                                    <li><a href="/admin/external_service/gitlab">GitLab</a></li>
                                    <li><a href="/admin/external_service/bitbucket_cloud">Bitbucket Cloud</a></li>
                                    <li><a href="/admin/external_service/bitbucket_server">Bitbucket Server</a></li>
                                    <li><a href="/admin/external_service/phabricator">Phabricator</a></li>
                                    <li><a href="/admin/external_service/gitolite">Gitolite</a></li>
                                    <li><a href="/admin/external_service/aws_codecommit">AWS CodeCommit</a></li>
                                    <li><a href="/admin/external_service/other">Other Git repository hosts</a></li>
                                </ul>
                            </li>
                            <li><a href="/admin/federation">Federation</a></li>
                            <li><a href="/admin/install">Installing Sourcegraph</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/admin/install/docker">Install Sourcegraph with Docker</a></li>
                                    <li class="content-nav-no-hover" data-sub-section-item="Install Sourcegraph with Docker" )>
                                        <ul>
                                            <li><a href="/admin/install/docker/aws">Install Sourcegraph with Docker on AWS</a></li>
                                            <li><a href="/admin/install/docker/digitalocean">Install Sourcegraph with Docker on DigitalOcean</a></li>
                                            <li><a href="/admin/install/docker/google_cloud">Install Sourcegraph with Docker on Google Cloud</a></li>
                                        </ul>
                                    </li>
                                    <li><a href="/admin/install/cluster">Installing Sourcegraph on a cluster</a></li>
                                </ul>
                            </li>
                            <li><a href="/admin/management_console">Management console</a></li>
                            <li><a href="/admin/migration">Migration guides</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/admin/migration/opengrok">Migrating from Oracle OpenGrok to Sourcegraph for code search</a></li>
                                    <li><a href="/admin/migration/3_0">Migrating to Sourcegraph 3.0.1+</a></li>
                                </ul>
                            </li>
                            <li><a href="/admin/monitoring_and_tracing">Monitoring and tracing</a></li>
                            <li><a href="/admin/sourcegraph-nginx-mermaid">NGINX and Sourcegraph diagram</a></li>
                            <li><a href="/admin/subscriptions">Paid subscriptions for Sourcegraph Enterprise</a></li>
                            <li><a href="/admin/pings">Pings</a></li>
                            <li><a href="/admin/repo">Repositories</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/admin/repo/add">Add repositories (from code hosts) to Sourcegraph</a></li>
                                    <li><a href="/admin/repo/add_from_local_disk">Add repositories already cloned to disk</a></li>
                                    <li><a href="/admin/repo/auth">Repositories that need HTTP(S) or SSH authentication</a></li>
                                    <li><a href="/admin/repo/permissions">Repository permissions</a></li>
                                    <li><a href="/admin/repo/webhooks">Repository webhooks</a></li>
                                    <li><a href="/admin/repo/perforce">Using Perforce repositories with Sourcegraph</a></li>
                                </ul>
                            </li>
                            <li><a href="/admin/search">Search configuration</a></li>
                            <li><a href="/admin/tls_ssl">Securing a Sourcegraph instance with TLS/SSL</a></li>
                            <li><a href="/admin/url">Setting the URL</a></li>
                            <li><a href="/admin/config">Site configuration</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/admin/config/critical_config">Critical configuration</a></li>
                                    <li><a href="/admin/config/site_config">Site configuration</a></li>
                                </ul>
                            </li>
                            <li><a href="/admin/nginx">Sourcegraph NGINX HTTP and HTTPS/SSL configuration</a></li>
                            <li><a href="/admin/postgres">Upgrading PostgreSQL</a></li>
                            <li><a href="/admin/updates">Upgrading Sourcegraph</a></li>
                            <li><a href="/admin/auth">User authentication (SSO)</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/admin/auth/saml_with_microsoft_adfs">Configuring SAML with Microsoft Active Directory Federation Services (ADFS)</a></li>
                                    <li><a href="/admin/auth/saml_with_onelogin">Configuring SAML with OneLogin</a></li>
                                </ul>
                            </li>
                            <li><a href="/admin/user_data_deletion">User data deletion</a></li>
                            <li><a href="/admin/external_database">Using external databases with Sourcegraph</a></li>
                            <li><a href="/admin/faq">Adminstration FAQ</a></li>
                            <li><a href="/admin/troubleshooting">Adminstration troubleshooting</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="content-nav-section expandable" data-nav-section="integration">
                    <button class="content-nav-button"></button>
                    <div class="close--icon">
                        <svg class="mdi-icon material-icons" width="24" height="24" fill="#000" viewBox="0 0 24 24">
                                <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                            </svg>
                    </div>
                    <li class="content-nav-no-hover">
                        <a class="content-nav-section-header" href="/integration">Integrations</a>
                        <ul class="content-nav-section-group">
                                <li><a href="/integration/github">GitHub</a></li>
                                <li><a href="/integration/gitlab">GitLab</a></li>
                                <li><a href="/integration/bitbucket_cloud">Bitbucket Cloud</a></li>
                                <li><a href="/integration/bitbucket_server">Bitbucket Server</a></li>
                                <li><a href="/integration/phabricator">Phabricator</a></li>
                                <li><a href="/integration/aws_codecommit">AWS CodeCommit</a></li>
                                <li><a href="/integration/gitolite">Gitolite</a></li>
                                <hr />
                                <li><a href="/integration/browser_extension">Browser extension</a></li>
                                <li><a href="/integration/browser_search_engine">Browser search engine shortcuts</a></li>
                                <li><a href="/integration/editor">Editor integrations</a></li>
                                <li><a href="/integration/google_gsuite">G Suite and Chrome Enterprise integration</a></li>
                                <li><a href="/integration/lightstep">LightStep</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="content-nav-section expandable" data-nav-section="extensions">
                    <button class="content-nav-button"></button>
                    <div class="close--icon">
                        <svg class="mdi-icon material-icons" width="24" height="24" fill="#000" viewBox="0 0 24 24">
                                <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                            </svg>
                    </div>
                    <li class="content-nav-no-hover">
                        <a class="content-nav-section-header" href="/extensions">Sourcegraph extensions</a>
                        <ul class="content-nav-section-group">
                            <li><a href="/extensions/principles">Principles of extensibility for Sourcegraph</a></li>
                            <li><a href="/extensions/security">Security and privacy of Sourcegraph extensions</a></li>
                            <li><a href="/extensions/authoring">Sourcegraph extension authoring</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/extensions/authoring/builtin_commands">Builtin commands</a></li>
                                    <li><a href="/extensions/authoring/cookbook">Cookbook for writing Sourcegraph extensions</a></li>
                                    <li><a href="/extensions/authoring/creating">Creating a Sourcegraph extension</a></li>
                                    <li><a href="/extensions/authoring/debugging">Debugging a Sourcegraph extension</a></li>
                                    <li><a href="/extensions/authoring/ux_style_guide">Extension UX style guide</a></li>
                                    <li><a href="/extensions/authoring/tutorials">Extension authoring tutorials</a></li>
                                    <li class="content-nav-no-hover" data-sub-section-item="Extension authoring tutorials" )>
                                        <ul>
                                            <li><a href="/extensions/authoring/tutorials/hello_world">Building a "Hello, world!" Sourcegraph extension</a></li>
                                            <li><a href="/extensions/authoring/tutorials/lang_specific_extension_tutorial">Building a language-specific extension tutorial</a></li>
                                            <li><a href="/extensions/authoring/tutorials/button_custom_commands">Sourcegraph extension buttons and custom commands</a></li>
                                        </ul>
                                    </li>
                                    <li><a href="/extensions/authoring/local_development">Local development (sideloading)</a></li>
                                    <li><a href="/extensions/authoring/publishing">Publishing a Sourcegraph extension</a></li>
                                    <li><a href="/extensions/authoring/forking">Publishing a local copy of an extension</a></li>
                                    <li><a href="/extensions/authoring/development_environment">Set up your development environment</a></li>
                                    <li><a href="/extensions/authoring/activation">Sourcegraph extension activation</a></li>
                                    <li><a href="/extensions/authoring/contributions">Sourcegraph extension contribution points</a></li>
                                    <li><a href="/extensions/authoring/manifest">Sourcegraph extension manifest - package.json</a></li>
                                </ul>
                            </li>
                            <li><a href="/extensions/usage">Using Sourcegraph extensions</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="content-nav-section expandable" data-nav-section="api">
                    <button class="content-nav-button"></button>
                    <div class="close--icon">
                        <svg class="mdi-icon material-icons" width="24" height="24" fill="#000" viewBox="0 0 24 24">
                                <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                            </svg>
                    </div>
                    <li class="content-nav-no-hover">
                        <a class="content-nav-section-header" href="/api">Sourcegraph APIs</a>
                        <ul class="content-nav-section-group">
                            <li><a href="/api/graphql">Sourcegraph GraphQL API</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="content-nav-section expandable" data-nav-section="adopt">
                    <button class="content-nav-button"></button>
                    <div class="close--icon">
                        <svg class="mdi-icon material-icons" width="24" height="24" fill="#000" viewBox="0 0 24 24">
                                <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                            </svg>
                    </div>
                    <li class="content-nav-no-hover">
                        <a class="content-nav-section-header" href="/adopt">Adopting Sourcegraph</a>
                        <ul class="content-nav-section-group">
                            <li><a href="/adopt/comp">Code search product comparisons</a></li>
                            <li><a href="/adopt/trial">How to run a Sourcegraph trial</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="content-nav-section expandable" data-nav-section="dev">
                    <button class="content-nav-button"></button>
                    <div class="close--icon">
                        <svg class="mdi-icon material-icons" width="24" height="24" fill="#000" viewBox="0 0 24 24">
                                <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                            </svg>
                    </div>
                    <li class="content-nav-no-hover">
                        <a class="content-nav-section-header" href="/dev">Sourcegraph development documentation</a>
                        <ul class="content-nav-section-group">
                            <li><a href="/dev/code_style_guide">Code style guide</a></li>
                            <li><a href="/dev/goals">Company goals</a></li>
                            <li><a href="/dev/graphql_api">Developing the Sourcegraph GraphQL API</a></li>
                            <li><a href="/dev/web_app">Developing the Sourcegraph web app</a></li>
                            <li><a href="/dev/local_development">Getting started with developing Sourcegraph</a></li>
                            <li><a href="/dev/incidents">Incidents</a></li>
                            <li><a href="/dev/issues">Issues</a></li>
                            <li><a href="/dev/release_issue_template">MAJOR.MINOR release (YYYY-MM-20)</a></li>
                            <li><a href="/dev/patch_release_issue_template">MAJOR.MINOR.PATCH release</a></li>
                            <li><a href="/dev/devrel_release_issue_template">MAJOR.MINOR release: DevRel tasks</a></li>
                            <li><a href="/dev/architecture-mermaid">N# Sourcegraph Architecture diagram</a></li>
                            <li><a href="/dev/postgresql">PostgreSQL storage tips</a></li>
                            <li><a href="/dev/phabricator_gitolite">Print info from Gitolite</a></li>
                            <li><a href="/dev/product">Product</a></li>
                            <li><a href="/dev/releases">Releases</a></li>
                            <li><a href="/dev/retrospectives">Retrospectives</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/dev/retrospectives/3_0">3.0 Retrospective</a></li>
                                    <li><a href="/dev/retrospectives/3_0_beta">3.0 beta retrospective</a></li>
                                    <li><a href="/dev/retrospectives/3_2">3.2 retrospective</a></li>
                                    <li><a href="/dev/retrospectives/3_3">3.3 retrospective</a></li>
                                    <li><a href="/dev/retrospectives/customer_license_expiration">Customer license expiration P0 retrospective</a></li>
                                    <li><a href="/dev/retrospectives/postgresql_upgrade">Tomás’ notes on the PostgreSQL upgrade</a></li>
                                </ul>
                            </li>
                            <li><a href="/dev/architecture">Sourcegraph Architecture Overview</a></li>
                            <li><a href="/dev/conduct">Sourcegraph Community Code of Conduct</a></li>
                            <li><a href="/dev/documentation">Sourcegraph documentation guidelines</a></li>
                            <li class="content-nav-no-hover">
                                <ul class="content-nav-section-subsection">
                                    <li><a href="/dev/documentation/site">Documentation site</a></li>
                                    <li><a href="/dev/documentation/structure">Documentation structure</a></li>
                                    <li><a href="/dev/documentation/style_guide">Documentation style guide</a></li>
                                </ul>
                            </li>
                            <li><a href="/dev/faq">Sourcegraph open-source project FAQ</a></li>
                            <li><a href="/dev/roadmap">Sourcegraph roadmap</a></li>
                            <li><a href="/dev/style_guide">Sourcegraph style guide</a></li>
                            <li><a href="/dev/open_source_open_company">Sourcegraph: open product, open company, open source</a></li>
                            <li><a href="/dev/telemetry">Telemetry</a></li>
                            <li><a href="/dev/testing">Testing</a></li>
                            <li><a href="/dev/typescript">TypeScript development guide</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="content-nav-section expandable" data-nav-section="graphbook">
                    <button class="content-nav-button"></button>
                    <div class="close--icon">
                        <svg class="mdi-icon material-icons" width="24" height="24" fill="#000" viewBox="0 0 24 24">
                                <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                            </svg>
                    </div>
                    <li class="content-nav-no-hover">
                        <a class="content-nav-section-header" href="/graphbook">Graphbook</a>
                        <ul class="content-nav-section-group">
                            <li><a href="/graphbook/communication">Communication</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
        {{with .Content}}
        <div class="page-nav column large-3 medium-3 small-12">
            {{template "index" .}}
        </div>
        {{end}}
        <section class="column large-7 large-push-2 medium-6 medium-push-3 small-12 docs-content-section">
            {{/* Create breadcrumb nav*/}} {{with .Content}}

            <nav id="breadcrumbs" class="breadcrumbs small-hidden">
                <input type="button" class="content-nav-mobile-state large-hidden medium-hidden" />
                <span class="content-nav-mobile-button"></span> {{if gt (len .Breadcrumbs ) 0}}
                <span class="breadcrumb-links">
                    {{if eq (len .Breadcrumbs ) 0}}
                        <a href="/" class=" large-hidden medium-hidden active">Documentation</a> &nbsp;
                    {{end}}
                    {{range .Breadcrumbs}}
                        <a href="{{.URL}}" class="{{if .IsActive}}active{{end}}">{{.Label}}</a>
                        {{if not .IsActive}}/{{end}}
                    {{end}} &nbsp;
                    </span>
                    {{end}}
            </nav>
            <div class="markdown-body">{{markdown .}}</div>
            {{else}}
            <nav id="breadcrumbs" class="breadcrumbs small-hidden">
                <input type="button" class="content-nav-mobile-state large-hidden medium-hidden">
                <span class="content-nav-mobile-button"></span>
            </nav>
            <div class="markdown-body">
                {{if .ContentVersionNotFoundError}}
                <h1>Version not found</h1>
                <p>The version <code>{{.ContentVersion}}</code> was not found.</p>
                {{else if .ContentPageNotFoundError}}
                <h1>Page not found</h1>
                <p>The page <code>{{.ContentPagePath}}</code> was not found.</p>
                {{else}} error {{end}}
            </div>
            {{end}}
        </section>
    </div>
    {{/* Keep up-to-date with Sourcegraph.com */}}
    <div class="footer-container column large-12">
        <div class="footer__block">
            <footer class="footer pt-6 pb-2">
                <div class="footer__container container">
                    <div class="row footer__nav-sections">
                        <div class="col-12 col-lg-3 mb-5">
                            <a aria-current="page" class="" href="https://about.sourcegraph.com/"><img class="footer__logo" src="https://d33wubrfki0l68.cloudfront.net/3ec402edbb475d12a54b840445834e4943985e74/c29e2/sourcegraph/logo--light.svg"></a>
                            <ul class="nav footer__social mt-1">
                                <li class="nav-item"><a href="https://github.com/sourcegraph" target="_blank"><svg class="mdi-icon " width="24" height="24" fill="currentColor" viewBox="0 0 24 24"><path d="M12,2C6.48,2 2,6.48 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12C22,6.48 17.52,2 12,2Z"></path></svg></a></li>
                                <li class="nav-item"><a href="https://twitter.com/srcgraph" target="_blank"><svg class="mdi-icon " width="24" height="24" fill="currentColor" viewBox="0 0 24 24"><path d="M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 3,4.79C2.63,5.42 2.42,6.16 2.42,6.94C2.42,8.43 3.17,9.75 4.33,10.5C3.62,10.5 2.96,10.3 2.38,10C2.38,10 2.38,10 2.38,10.03C2.38,12.11 3.86,13.85 5.82,14.24C5.46,14.34 5.08,14.39 4.69,14.39C4.42,14.39 4.15,14.36 3.89,14.31C4.43,16 6,17.26 7.89,17.29C6.43,18.45 4.58,19.13 2.56,19.13C2.22,19.13 1.88,19.11 1.54,19.07C3.44,20.29 5.7,21 8.12,21C16,21 20.33,14.46 20.33,8.79C20.33,8.6 20.33,8.42 20.32,8.23C21.16,7.63 21.88,6.87 22.46,6Z"></path></svg></a></li>
                                <li class="nav-item"><a href="https://www.linkedin.com/company/4803356/" target="_blank"><svg class="mdi-icon " width="24" height="24" fill="currentColor" viewBox="0 0 24 24"><path d="M19,3C20.1,3 21,3.9 21,5V19C21,20.1 20.1,21 19,21H5C3.9,21 3,20.1 3,19V5C3,3.9 3.9,3 5,3H19M18.5,18.5V13.2C18.5,11.4 17.04,9.94 15.24,9.94C14.39,9.94 13.4,10.46 12.92,11.24V10.13H10.13V18.5H12.92V13.57C12.92,12.8 13.54,12.17 14.31,12.17C15.08,12.17 15.71,12.8 15.71,13.57V18.5H18.5M6.88,8.56C7.81,8.56 8.56,7.81 8.56,6.88C8.56,5.95 7.81,5.19 6.88,5.19C5.95,5.19 5.19,5.95 5.19,6.88C5.19,7.81 5.95,8.56 6.88,8.56M8.27,18.5V10.13H5.5V18.5H8.27Z"></path></svg></a></li>
                            </ul>
                        </div>
                        <div class="col-sm-6 col-md-3 col-lg-2 mb-3">
                            <h3 class="footer__nav-header">Why Sourcegraph?</h3>
                            <ul class="nav flex-column">
                                <li class="nav-item"><a href="https://about.sourcegraph.com/product">Product</a></li>
                                <li class="nav-item"><a href="https://about.sourcegraph.com/product">What is a developer platform?</a></li>
                                <li class="nav-item"><a href="https://about.sourcegraph.com/pricing">Pricing</a></li>
                            </ul>
                        </div>
                        <div class="col-sm-6 col-md-3 col-lg-2 mb-3">
                            <h3 class="footer__nav-header">Features &amp; use cases</h3>
                            <ul class="nav flex-column">
                                <li class="nav-item"><a href="https://about.sourcegraph.com/product/code-search-navigation">Code search</a></li>
                                <li class="nav-item"><a href="https://about.sourcegraph.com/product/code-review">Code review</a></li>
                                <li class="nav-item"><a href="https://about.sourcegraph.com/product/code-alerts-automation">Code alerts &amp; automation</a></li>
                            </ul>
                        </div>
                        <div class="col-sm-6 col-md-3 col-lg-2 mb-3">
                            <h3 class="footer__nav-header">Resources</h3>
                            <ul class="nav flex-column">
                                <li class="nav-item"><a href="https://docs.sourcegraph.com">Documentation</a></li>
                                <li class="nav-item"><a href="https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/CHANGELOG.md">Changelog</a></li>
                                <li class="nav-item"><a href="https://about.sourcegraph.com/blog">Blog</a></li>
                            </ul>
                        </div>
                        <div class="col-sm-6 col-md-3 col-lg-2 mb-3">
                            <h3 class="footer__nav-header">Company</h3>
                            <ul class="nav flex-column">
                                <li class="nav-item"><a href="https://about.sourcegraph.com/plan">Master plan</a></li>
                                <li class="nav-item"><a href="https://about.sourcegraph.com/about">About</a></li>
                                <li class="nav-item"><a href="https://about.sourcegraph.com/contact">Contact</a></li>
                                <li class="nav-item"><a href="https://about.sourcegraph.com/jobs">Careers</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="footer__postscript d-flex justify-content-between pt-4 pb-2 small">
                        <ul class="nav">
                            <li class="nav-item text-muted mr-3">Copyright © 2019 Sourcegraph</li>
                            <li class="nav-item"><a class="nav-link" href="https://about.sourcegraph.com/terms">Terms</a></li>
                            <li class="nav-item"><a class="nav-link" href="https://about.sourcegraph.com/security">Security</a></li>
                            <li class="nav-item"><a class="nav-link" href="https://about.sourcegraph.com/privacy">Privacy</a></li>
                        </ul>
                    </div>
                </div>
            </footer>
        </div>
    </div>
    <script src="{{asset "docs.js"}}?12"></script>
    {{with .Content}}
        <script>sgdocs.init(breadcrumbs = {{ .Breadcrumbs }});</script>
    {{else}}
        <script>
            sgdocs.init(breadcrumbs = null);
        </script>
    {{ end }}

    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-40540747-20"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }
        gtag('js', new Date());
        gtag('config', 'UA-40540747-20');
    </script>
    </body>
</html>
{{end}}

{{/*
	The index and doc_nav templates are copied to the https://github.com/sourcegraph/sourcegraph
	repository's docsite package. They should be kept in sync.
*/}}

{{/* Define Page (Right Hand) Nav */}}
{{define "index"}}
    {{with (or (and (eq (len .Doc.Tree) 1) (index .Doc.Tree 0).Children) .Doc.Tree)}}
        <h3 class="page-nav-title">On this page:</h3>
        <ul>{{template "doc_nav" .}}</ul>
    {{end}}
    <a class="nav-edit-button btn btn-outline-secondary btn-sm" target="blank" href="https://github.com/sourcegraph/sourcegraph/edit/master/doc/{{.FilePath}}">Edit this page on GitHub</a>
{{end}}

{{define "doc_nav"}}
    {{range .}}
        <li>
            <a href="{{.URL}}">{{.Title}}</a>
        </li>
    {{end}}
{{end}}

{{define "doc_nav_nested"}}
    {{range .}}
        <li>
            <a href="{{.URL}}">{{.Title}}</a>
            {{with .Children}}
                <ul>
                    {{template "doc_nav" .}}
                </ul>
            {{end}}
        </li>
    {{end}}
{{end}}
